package com.gateon.hw.yunding.service;

import com.gateon.hw.yunding.model.Urls;
import org.eclipse.paho.client.mqttv3.MqttException;

import java.util.List;


/**
 * @program: hw
 * @description: qiuheyi
 * @author: qhy
 * @create: 2020-08-20 13:14
 **/
public interface SoundService {
    /**
     * 登陆
     * @param name
     * @param password
     * @return
     */
    String sing(String name, String password) throws MqttException;

    /**
     * 账户下全部设备信息
     * @param uid
     * @throws MqttException
     */
    String getAllDevices(String uid) throws MqttException;

    /**
     * 添加任务
     * @param uid
     * @param name
     * @param devices
     * @param urls
     * @param vol
     * @throws MqttException
     */
    String addTask(String uid, String name, String[] devices, List<Urls> urls, Long vol) throws MqttException;

    /**
     * 删除任务
     * @param uid
     * @param tid
     * @throws MqttException
     */
    void delTask(String uid,String tid) throws MqttException;

    /**
     * 开始任务
     * @param uid
     * @param tid
     * @throws MqttException
     */
    String playTask(String uid,String tid) throws MqttException;


    /**
     * 停止任务
     * @param uid
     * @param tid
     * @throws MqttException
     */
    String stopTask(String uid,String tid) throws MqttException;
}
